# Contributor: Vince Mele <vmele@inoc.com>
# Maintainer: Vince Mele <vmele@inoc.com>
pkgname=ding-libs
pkgver=0.6.2
pkgrel=4
pkgdesc="'D is not GLib' utility libraries"
url="https://pagure.io/SSSD/ding-libs/"
arch="all"
license="GPL-3.0 LGPL-3.0"
# TODO: add check-dev to checkdepends
checkdepends="check-dev diffutils" # need option -b to cmp
depends=""
makedepends="icu-dev gettext-dev libintl"
install=""
subpackages="$pkgname-dev"
source="https://github.com/SSSD/ding-libs/releases/download/$pkgver/ding-libs-$pkgver.tar.gz
	musl-fixes.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare

	#update_config_sub # No update needed for ./build/config.sub
	#update_config_guess # No update needed for ./build/config.guess
}

build() {
	cd "$builddir"
	export LDFLAGS="$LDFLAGS -lintl"
	./configure --prefix=/usr --disable-static
	make all
}

check() {
	cd "$builddir"
	make -j1 check
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir/" install

	rm -rf $pkgdir/usr/share
}

sha512sums="
566172e0addb0ee6e0ebd12874d3b72f2fa6bcb1ecc628c0c529984193290fae554efc40f52d2cec675bffab32a36183e47ec629db25e83ed2995f1049c64703  ding-libs-0.6.2.tar.gz
22cdec129b19fbc7caf1c56004cd2d00197719bc1dc9835a5d74228affe947b93061ad57612a36b75032891e8e5d4d6970bbc9c6b0057659541686c76770221e  musl-fixes.patch
"
